package org.zhxy.common.base;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zhxy.common.response.Result;
import org.zhxy.common.response.ResultCode;

@RestController
@CrossOrigin
public class ErrorController {

    @RequestMapping("/authError")
    public Result authError(int code){
        return code == 1 ? new Result(ResultCode.UN_AUTH_NO_LOGIN) : new Result(ResultCode.UN_AUTH_PERMISSION);
    }
}

